import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { ECountryMoneyEvent } from "./ECountryMoneyEvent";
import { EUpdateType } from "../Public/EUpdateType";
type int = number;
//class SCountryMoneyRecord
    
    export  class SCountryMoneyRecord extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SCountryMoneyRecord();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.serverId);
            arg1.writeInt(this.proxyId);
            arg1.writeInt(this.playerId);
            arg1.writeString(this.playerName);
            this.event.__write(arg1);
            this.updateType.__write(arg1);
            arg1.writeInt(this.updateValue);
            arg1.writeDate(this.recordDt);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.serverId = arg1.readInt();
            this.proxyId = arg1.readInt();
            this.playerId = arg1.readInt();
            this.playerName = arg1.readString();
            this.event = ECountryMoneyEvent.__read(arg1);
            this.updateType = EUpdateType.__read(arg1);
            this.updateValue = arg1.readInt();
            this.recordDt = arg1.readDate();
            return;
        }

        public /* const */_type: int=1004;

        public /* var */serverId: int;

        public /* var */proxyId: int;

        public /* var */playerId: int;

        public /* var */playerName: string;

        public /* var */event: ECountryMoneyEvent;

        public /* var */updateType: EUpdateType;

        public /* var */updateValue: int;

        public /* var */recordDt: Date;

        public static /* var */_regist: SCountryMoneyRecord;
    }

            SCountryMoneyRecord._regist = new SCountryMoneyRecord(true);
        